home *** CD-ROM | disk | FTP | other *** search
- # Trumpet Winsock Script for Communications Accessibles Montreal
- #
- #trace on
- #
- # set up some strings for dialling up
- #
- if ![load $number]
- if [query $number "Enter your dial up phone number"]
- save $number
- end
- end
-
- # number of dial attempts
- %attempts = 10
- #
- #
- #----------------------------------------------------------
- #
- # initialize modem
- #
- output atz\13
- if ! [input 10 OK\n]
- display "Modem is not responding"\n
- abort
- end
- #
- # setup our modem commands
- #
- output atm1\13
- # [substitude atm0 to silence the modem during dialling]
- input 10 OK\n
- #
- # send phone number
- #
- %n = 0
- %ok = 0
- repeat
- if %n = %attempts
- display "Too many dial attempts"\n
- abort
- end
- output \13
- sleep 1
- output "atdt"$number\13
- if ! [input 10 BUSY]
- %ok = [input 60 CONNECT]
- end
- %n = %n + 1
- until %ok
- input 10 \n
- #
- # wait till it's safe to send because some modem's hang up
- # if you transmit during the connection phase
- #
- wait 30 dcd
- #
- # now prod the terminal server
- #
- output \13
- #
- # wait for the username prompt
- #
- input 30 login:
- #
- # we are now connected, and waiting for PAP authentification.